﻿Namespace Entities

    ''' <summary>
    ''' Defines user stats timerange string for user stats timerange
    ''' </summary>
    ''' <remarks></remarks>
    <Serializable()>
    Public NotInheritable Class UserStatsTimeRanges
        Private Sub New()

        End Sub

        ''' <summary>
        ''' Gets the type string from userstats type enum value.
        ''' </summary>
        ''' <param name="type">The userstats type enum value.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Shared Function GetString(type As Entities.UserStatsTimeRange) As String
            Select Case type
                Case Entities.UserStatsTimeRange.Day
                    Return UserStatsTimeRanges.Day
                Case Entities.UserStatsTimeRange.Month
                    Return UserStatsTimeRanges.Month
                Case Entities.UserStatsTimeRange.Quarter
                    Return UserStatsTimeRanges.Quarter
                Case Entities.UserStatsTimeRange.Week
                    Return UserStatsTimeRanges.Week
                Case Else
                    Return UserStatsTimeRanges.Year
            End Select
        End Function

        Public Shared ReadOnly Property Day As String
            Get
                Return "day"
            End Get
        End Property

        Public Shared ReadOnly Property Week As String
            Get
                Return "week"
            End Get
        End Property

        Public Shared ReadOnly Property Month As String
            Get
                Return "month"
            End Get
        End Property

        Public Shared ReadOnly Property Quarter As String
            Get
                Return "quarter"
            End Get
        End Property

        Public Shared ReadOnly Property Year As String
            Get
                Return "year"
            End Get
        End Property

    End Class

End Namespace

